package cn.edu.scau.cmi.linzhanyi.singleton;

public class Chairman {

    private static Chairman chairman=null;
    private String name;

    private Chairman(String name) {
        this.name=name;
    }

    public static boolean createInstance(String name) {
//		Chairman chairman = null;
        if (chairman == null) {
            chairman = new Chairman(name);
            return true;
        }
        return false;
    }

    public static Chairman getInstance() {
//		Chairman chairman = null;
       return  chairman;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String excuteOfDuty(){
        return  "苟利国家生死以，岂因祸福避趋之";
    }

}
